home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / asm32.zip / E32.ZIP / TWO_MON.ASM < prev    next >
Assembly Source File  |  1994-03-09  |  935b  |  54 lines

  1. ; TWO_MON.ASM for E32 - Copyright (C) 1994 Douglas Herr
  2. ;  all rights reserved
  3.  
  4. include    model.inc
  5.  
  6. public    two_mon
  7. extrn    tomono:near
  8. extrn    tocolor:near
  9. extrn    cursoroff:near
  10. extrn    showfkey:near
  11. extrn    swapb:near
  12. extrn    set_screen_dimensions:near
  13.  
  14. include    dataseg.inc
  15. extrn    screen_data_size:abs
  16. extrn    columns:word, screen2_data:word
  17. extrn    rows:word
  18. extrn    dirty_bits:byte
  19. extrn    screen_addr:dword
  20. extrn    monitors:byte
  21. @curseg    ends
  22.  
  23. include    codeseg.inc
  24. two_mon    proc    near
  25.     call    cursoroff
  26.     or    dirty_bits,1        ; screen is dirty
  27.     cmp    screen_addr,0B0000h
  28.     je    short monochrome
  29.     call    tomono
  30.     jmp    short exit
  31.  
  32. monochrome:
  33.     call    tocolor
  34. exit:    jc    short oops        ; if no other monitor, turn flag off
  35.     mov    eax,screen_data_size
  36.     push    ds
  37.     pop    es
  38.     lea    esi,columns
  39.     lea    edi,screen2_data
  40.     call    swapb
  41.     mov    ax,rows
  42.     inc    ax
  43.     mov    bx,columns
  44.     jmp    set_screen_dimensions
  45.  
  46. two_mon    endp
  47.  
  48. oops:
  49.     clc
  50.     ret
  51.  
  52. @curseg    ends
  53.     end
  54.